package com.atguigu.srb.core.service;
import com.atguigu.srb.core.pojo.entity.UserInfo;
import com.atguigu.srb.core.pojo.query.UserInfoQuery;
import com.atguigu.srb.core.pojo.vo.LoginVO;
import com.atguigu.srb.core.pojo.vo.RegisterVO;
import com.atguigu.srb.core.pojo.vo.UserIndexVO;
import com.atguigu.srb.core.pojo.vo.UserInfoVO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * <p>
 * 用户基本信息 服务类
 * </p>
 *
 * @author Helen
 * @since 2022-08-16
 */
public interface UserInfoService extends IService<UserInfo> {
    /**
     * 用户注册
     */
    void register(RegisterVO registerVo);

    /**
     * 用户登陆
     */
    UserInfoVO login(LoginVO loginVO, String ip);

    /**
     * 用户分页查询
     */
    IPage<UserInfo> listPage(Page<UserInfo> pageParams, UserInfoQuery userInfoQuery);

    /**
     * 用户状态锁定与解锁
     */
    void lock(Long id,Integer status);

    /**
     * 判断手机号是否注册过
     */
    boolean checkMobile(String mobile);

    UserIndexVO getIndexUserInfo(Long userId);

}
